package week_5.homework;

public class ProductListTest {
    public static void main(String[] args) {
        ProductList shop = new ProductList();

        shop.addToRear(new Product("香皂" ,2.5 , 1,"舒肤佳"));
        shop.addToRear(new Product("毛巾" ,10 , 2,"宜家"));
        shop.addToRear(new Product("牙刷" ,8.6 , 3,"高露洁"));
        shop.addToRear(new Product("可乐" ,5.5 , 4));
        shop.addToFront(new Product("饼干" ,7.8 , 5));
//        shop.addToRear(new Product("G" ,2.5 , 1,"舒肤佳"));
//        shop.addToRear(new Product("E" ,10 , 2,"宜家"));
//        shop.addToRear(new Product("C" ,8.6 , 3,"高露洁"));
//        shop.addToRear(new Product("S" ,5.5 , 4));
//        shop.addToFront(new Product("E" ,7.8 , 5));
        System.out.println("商品原本的列表");
        System.out.println(shop.toString());
        System.out.println("---------------------分割线---------------------------");
        System.out.println("商品中是否有香皂？（返回true或false）");
        System.out.println(shop.find("香皂"));
        System.out.println("---------------------分割线---------------------------");
        System.out.println("排序后商品的列表为：");
        shop.seletionSort();
        System.out.println(shop.toString());
        System.out.println("---------------------分割线---------------------------");
        System.out.println("商品总数为：");
        System.out.println(shop.size());
        System.out.println("---------------------分割线---------------------------");
        System.out.println("第一个商品为：");
        System.out.println(shop.first());

    }
}
